package vn.fsoft.gst.domain;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 
 * @author MinhNT
 *
 */
@Entity
@Table(name = "programe")
public class Programe {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ProgID")
	private int progID;
	
	@ManyToOne
	@JoinColumn(name = "ContactID")
	private Contact contact;
	
	@Column(name = "ProgrameName")
	private String programeName;
	
	@OneToMany(mappedBy="programe")
	private List<OrganisationPrograme> listOrganisationProgrames;

	public int getProgID() {
		return progID;
	}

	public void setProgID(int progID) {
		this.progID = progID;
	}

	public Contact getContact() {
		return contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

	public String getProgrameName() {
		return programeName;
	}

	public void setProgrameName(String programeName) {
		this.programeName = programeName;
	}

	public List<OrganisationPrograme> getListOrganisationProgrames() {
		return listOrganisationProgrames;
	}

	public void setListOrganisationProgrames(
			List<OrganisationPrograme> listOrganisationProgrames) {
		this.listOrganisationProgrames = listOrganisationProgrames;
	}

	public Programe(int progID, Contact contact, String programeName,
			List<OrganisationPrograme> listOrganisationProgrames) {
		super();
		this.progID = progID;
		this.contact = contact;
		this.programeName = programeName;
		this.listOrganisationProgrames = listOrganisationProgrames;
	}

	public Programe() {

	}
}
